package com.barbeque.mall.bean.advertise.VO;

import lombok.Data;

/**
 * @author bai
 * @since 2022/07/16 14:11
 */
@Data
public class MyBaseRespVo {

    /**
     * errno : 0
     * errmsg : 成功
     */
    private int errno;
    private String errmsg;

    public static MyBaseRespVo ok(){
        MyBaseRespVo myBaseRespVo = new MyBaseRespVo();
        myBaseRespVo.setErrno(0);
        myBaseRespVo.setErrmsg("成功");

        return myBaseRespVo;
    }

    public static MyBaseRespVo fail(){
        MyBaseRespVo myBaseRespVo = new MyBaseRespVo();
        myBaseRespVo.setErrmsg("优惠券已经领取过");
        myBaseRespVo.setErrno(740);

        return myBaseRespVo;
    }

    public static MyBaseRespVo noToal(){
        MyBaseRespVo myBaseRespVo = new MyBaseRespVo();
        myBaseRespVo.setErrmsg("优惠券没有库存了");
        myBaseRespVo.setErrno(740);

        return myBaseRespVo;
    }

    public static MyBaseRespVo wrongCode(){
        MyBaseRespVo myBaseRespVo = new MyBaseRespVo();
        myBaseRespVo.setErrmsg("优惠券不正确");
        myBaseRespVo.setErrno(742);

        return myBaseRespVo;
    }

    public static MyBaseRespVo rightCode(){
        MyBaseRespVo myBaseRespVo = new MyBaseRespVo();
        myBaseRespVo.setErrno(740);
        myBaseRespVo.setErrmsg("优惠券已兑换");
        return myBaseRespVo;
    }

    public static MyBaseRespVo notLogin(){
        MyBaseRespVo myBaseRespVo = new MyBaseRespVo();
        myBaseRespVo.setErrmsg("请登录");
        myBaseRespVo.setErrno(501);
        return myBaseRespVo;
    }

}
